﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Imports Utilerias
Imports Npgsql
Imports MySql.Data.MySqlClient
Public Class MetodospagFact
    Public Shared Function Build(ByVal dr As MySqlDataReader) As MetodospagBE
        Dim tmpMetodopag As MetodospagBE = New MetodospagBE()
        Try
            With tmpMetodopag
                '.IdEmpresa = convertDTFromDb.convertInt32(dr.Item("IdEmpresa"))
                .IdMetodP = convertDTFromDb.convertInt32(dr.Item("IdMetodP"))
                .DesMetodoP = convertDTFromDb.ConvertString(dr.Item("DesMetodoP"))
                Select Case convertDTFromDb.ConvertString(dr.Item("Status"))
                    Case "A"
                        .Status = MetodospagBE.EstatusMetodopag.Activo
                    Case "I"
                        .Status = MetodospagBE.EstatusMetodopag.Inactivo
                    Case Else
                        .Status = MetodospagBE.EstatusMetodopag.Inactivo
                End Select
            End With
            Return tmpMetodopag
        Catch ex As Exception
            Throw
        Finally
            tmpMetodopag = Nothing
        End Try
    End Function

End Class
